package itheima.C04;

import cn.hutool.core.io.FileUtil;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;

public class Test8 {
    public static void main(String[] args) throws IOException {
        FileUtils.copyDirectory(new File("Day11_io\\src\\itheima\\C04"),new File("Day11_io\\src\\itheima\\C04\\copy"));
        List<String> datas= IOUtils.readLines(new FileInputStream("Day11_io\\src\\itheima\\C04\\yang.txt"), "utf-8");
        for (String data:datas){

            System.out.println(data);
        }
        FileUtil.copy("Day11_io\\src\\itheima\\C04\\yang.txt","Day11_io\\src\\itheima\\C04\\yang2.txt",true)  ;
        System.out.println("复制成功");
    }
}
